<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用入口文件
// 定义项目路径
define('APP_PATH', __DIR__ . '/../application/');
// 开启调试模式
define('APP_DEBUG', true);

if(APP_DEBUG){
    //删除缓存页面
    $tmp_path = APP_PATH.'runtime/temp/';
    $filesnames = scandir($tmp_path);

    foreach ($filesnames as $name) {
        if(strlen($name) > 2){
            unlink($tmp_path.$name);
        }
    }
}
// 加载框架引导文件
require __DIR__ . '/../thinkphp/start.php';
// 执行应用
\think\App::run();
